package com.reptile.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.reptile.domain.Taobao;
import com.reptile.service.impl.TaobaoServiceImpl;




@RestController
public class TaobaoController 
{
	@Autowired
	private TaobaoServiceImpl tbservice;
	
	@RequestMapping("ceshi")
	public String taobao1()
	{
		Taobao taobao=new Taobao();
		taobao.setId(3);
		taobao.setName("aikusfy");
		tbservice.TaobaoSave(taobao);
		return "success";
	}
	
	@RequestMapping("wuxin")
	public List<Taobao> wuxinqq()
	{
		//System.out.println(tbservice.TaobaoFind());
		return tbservice.TaobaoFind();
	}
	
	
	@RequestMapping("redis")
	public String findRedis()
	{
		String redis=tbservice.findRedis();
		return redis;
	}
}
